function baseGet (url) {
    const headers = { "Content-type": "application/json" }
    return fetch(url, { headers }).then(res => res.json())
}

if ($event.dataIndex === 'taskReceiveType') {
    const { parentProjectAreaId } = $event;
    if (+parentProjectAreaId === -1) {
        layer?.msg('项目区域未标注，请联系管理员标注所选区域。')
    } else {
        // 获取区域设备列表
        baseGet(`/${prefix}Basics/basics-main/system/equipmentObject/listDetailByEquipmentCode?equipmentTypeCode=camera&areaId=${ parentProjectAreaId }`)
            .then(({ resultCode, result } = {}) => {
                if (resultCode === '000000' && Array.isArray(result?.rows)) {
                    const devices = result.rows.map(i=> ({
                        ...i,
                        name: i.equipmentName,
                        value: i.equipmentCode
                    }))
                    this.widgetObj.asyncSelectOptions('sourceDeviceId', devices)
                    this.widgetObj.tempData = devices
                }
            });

        const form = this.getApiPage().retrievePlugin('base-forms')
        form.setFormData('form_19', {
            occurrencePlace: $event.projectAreaName,
        }) // add
        form.setFormData('form_20', {
            occurrencePlace: $event.projectAreaName,
        }) // detail
    }

}